{% extends "WebMainSiteBundle:User:layout.html.twig" %}
{% set title = "消息中心" %}
{% block title %}
    {{ title }}
{% endblock %}

{% block user_main %}
    <aside class="col-md-12 message" role="complementary">
        <section class="widget posts">
            <h2 class="yahei">最新消息</h2>
            <ul>
                {% for m in messages %}
                    <li><a href="{{ path("WebUserMessageShow",{id:m.id}) }}">
                            <h3>
                                <span style="float: right;font-weight: normal">[ {{ m.addTime | date("Y-m-d H:i") }} ]</span>
                                [{{ m.name }}]
                                {{ m.title }}
                            </h3>
                            <p>{{ (m.content|striptags|slice(0,60))}}...</p>
                        </a>
                    </li>
                {% endfor %}
            </ul>
        </section>
    </aside>
{% endblock %}
{% block myCss %}
    <style>
        .message{}
        .message h2{border-bottom: dotted 1px #ccc}
        .message li{border-bottom: dotted 1px #ccc;margin-top: 10px}
        .message li h3 span{float: right;}
    </style>

{% endblock %}